package com.ps.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ps.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户表 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2020-12-18
 */
public interface UserMapper extends BaseMapper<User> {
    @Select("select u.*,r.rolename from ps_user as u " +
            "inner join ps_role as r on u.roleid=r.id ${ew.customSqlSegment}")
    public Page<User> getAll(Page<User> page, @Param(Constants.WRAPPER) Wrapper<User> wrapper);
}
